 <?php                                                                                              
    $csspath = '';
    $jspath = 'email/email.js';
 ?>
<?php require_once VIEWPATH.'common/header.php'; ?>
<?php require_once VIEWPATH.'common/sidebar.php'; ?>
<link href="<?=STATICURL?>css/page.css" rel="stylesheet">
<!--main content start-->
<section id="main-content">
    <section class="wrapper site-min-height">
        <div class="row mt">
                  <div class="col-md-12">
                      <div class="content-panel">
                          <table class="table table-striped table-advance table-hover">
	                  	  	  <h4><i class="fa fa-angle-right"></i>我的消息</h4>
	                  	  	  <hr>
                              <thead>
                              <tr>
                                  <th><i class="fa fa-bullhorn"></i> From</th>
                                  <th class="hidden-phone"><i class="fa fa-question-circle"></i> Description</th>
                                  <th><i class="fa fa-bookmark"></i> Time</th>
                                  <th></th>
                              </tr>
                              </thead>
                              <tbody>
                                <?php if(!empty($emailList)):?>
	                            <?php foreach ($emailList as $key => $value):?>
	                            	<?php if(!$value['readtime']):?> 
	                              	<tr  style="color:#000000;font-weight: bold;" >
	                          	<?php else:?>
	                          		<tr >
	                            <?php endif;?>
	                                  <td>
	                                       <?=$value['from_username']?>
	                                  </td>
	                                  <td class="hidden-phone">
	                                  <a <?php if(!$value['readtime']):?> style="color:#000000;font-weight: bold;"
	                          	<?php else:?>style="color:gray;"<?php endif;?> href="/email/detail?id=<?=$value['id']?>"><?=$value['subject']?></a>
	                          			</td>
	                                  <td><?=humanDate($value['createtime'])?></td>
	                                  <td data_id = "<?= $value['pushid'];?>">
                                      <span class="btn btn-danger btn-xs J_del"><i class="fa fa-trash-o "></i></span>
                                  </td>
	                              </tr>
	                            <?php endforeach;?>
	                        	<?php else:?>
	                        		<tr><td colspan ="4" style="text-align: center;">收件箱为空</td></tr>
                          		<?php endif;?>
                          		 <tr>
                                    <td align='center' colspan ="4"> <div class="page_links"><?= $page_links?></div></td>
                                </tr>
                              </tbody>
                          </table>
                      </div><!-- /content-panel -->
                  </div><!-- /col-md-12 -->
              </div><!-- /row -->
  </section>
</section>
<?php require_once VIEWPATH.'common/footer.php'; ?>
